import React from "react"
// function Suit(Wrap) {
//    return class SuitBox extends React.Component{
//        state={
//            skill:"动感光波，镭射激光",
//            weapon:"big gun",
//            nickname:"钢铁侠"
//        }
//        attack=()=>{
//            alert("开炮，给我炸他个狗娘养的")
//        }
//        render(){
//            return <Wrap {...this.state} attack={this.attack}></Wrap>
//        }
//    }   
// }
// export default Suit
//反向继承
function Inversion(Wrap) {
    return class InversionBox extends Wrap {
        componentDidMount() {
            setTimeout(() => {
                this.setState({
                    name: "罗某人",
                    nature: "坦克攻击"
                })
            }, 3000)
        }
        render() {
            console.log(this.state)
            return (
                <Wrap>

                </Wrap>
            )
        }
    }
}
export default Inversion